import { lazy } from 'react';
import Project from './Project';
import Strategy from './Strategy';
import Component from './Strategy/Component';
import NewComponent from './Strategy/Component/new';
import EditComponent from './Strategy/Component/edit';
import DetailComponent from './Strategy/Component/detail';
import VersionManage from './Strategy/Component/Version';
import EditStrategy from './Strategy/edit';
import NewStrategy from './Strategy/new';

export default [
  {
    path: '/strategy/project',
    name: '项目管理',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? Project : lazy(() => import('./Project')),
  },
  {
    path: '/strategy/config/index',
    name: '策略配置',
    des:
      '策略是对某类风险或行为的定义，风控引擎基于策略的命中返回识别的结果，配置策略时您可以手动新建或引用系统预置的策略。',
    component: window.__POWERED_BY_QIANKUN__ ? Strategy : lazy(() => import('./Strategy')),
  },
  {
    path: '/strategy/config/add',
    name: '新建策略',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? NewStrategy : lazy(() => import('./Strategy/new')),
    meta: {
      title: '新建策略',
      activeMenu: '/smp/strategy/config/index',
    },
  },
  {
    path: '/strategy/config/:id/edit',
    name: '编辑策略',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? EditStrategy : lazy(() => import('./Strategy/edit')),
    meta: {
      title: '编辑策略',
      activeMenu: '/smp/strategy/config/index',
    },
  },
  {
    path: '/strategy/component/:id/version',
    name: '策略组件版本管理',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? VersionManage : lazy(() => import('./Strategy/Component/Version')),
    meta: {
      title: '策略组件版本管理',
      activeMenu: '/smp/strategy/config/index',
    },
  },
  {
    path: '/strategy/component/index',
    name: '组件管理',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? Component : lazy(() => import('./Strategy/Component')),
  },
  {
    path: '/strategy/component/add',
    name: '新建组件',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? NewComponent : lazy(() => import('./Strategy/Component/new')),
    meta: {
      title: '新建组件',
      activeMenu: '/smp/strategy/component/index',
    },
  },
  {
    path: '/strategy/component/:id/edit',
    name: '编辑组件',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? EditComponent : lazy(() => import('./Strategy/Component/edit')),
    meta: {
      title: '编辑组件',
      activeMenu: '/smp/strategy/component/index',
    },
  },
  {
    path: '/strategy/component/:id/detail',
    name: '组件详情',
    des: '',
    component: window.__POWERED_BY_QIANKUN__ ? DetailComponent : lazy(() => import('./Strategy/Component/detail')),
    meta: {
      title: '组件详情',
      activeMenu: '/smp/strategy/component/index',
    },
  },
  // {
  //   path: '/strategy/application',
  //   name: '渠道管理',
  //   des:
  //     '您可以为不同的业务系统，不同的平台场景创建渠道，创建渠道后您将获取到AppKey、AppSecret信息，在开发接入时使用。',
  //   component: lazy(() => import('./Application')),
  //   exact: true,
  //   auth: true,
  // },
  // {
  //   path: '/strategy/event',
  //   name: '事件管理',
  //   des: '事件是风控请求的基本单位，如用户注册事件、登录事件、交易事件。',
  //   component: lazy(() => import('./Event')),
  //   exact: true,
  //   auth: true,
  // },
  {
    path: '/strategy/audit',
    name: '上线审核',
    des: '',
    component: lazy(() => import('./Audit')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/Template',
    name: '策略模板管理',
    des: '',
    component: lazy(() => import('./StrategyTemplate')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/Template/export',
    name: '策略模板导出',
    des: '',
    component: lazy(() => import('./StrategyTemplate/Export')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/Template/import',
    name: '策略模板导入',
    des: '',
    component: lazy(() => import('./StrategyTemplate/importMent')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/Template/:id/edit',
    name: '编辑策略模板',
    des: '',
    component: lazy(() => import('./StrategyTemplate/edit')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/Template/:id/detail',
    name: '策略模板详情',
    des: '',
    component: lazy(() => import('./StrategyTemplate/detail')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/config/:id/copy',
    name: '复制策略',
    des: '',
    component: lazy(() => import('./Strategy/copy')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/config/:id/detail',
    name: '策略详情',
    des: '',
    component: lazy(() => import('./Strategy/detail')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/config/export',
    name: '导出策略',
    des: '',
    component: lazy(() => import('./Strategy/Export')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/config/import',
    name: '导入策略',
    des: '',
    component: lazy(() => import('./Strategy/Import')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/component/export',
    name: '导出组件',
    des: '',
    component: lazy(() => import('./Strategy/Exportcomponent')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/component/import',
    name: '导入组件',
    des: '',
    component: lazy(() => import('./Strategy/Importcomponent')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/component/:id/copy',
    name: '复制策略组件',
    des: '',
    component: lazy(() => import('./Strategy/Component/copy')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/config/:id/version',
    name: '策略版本管理',
    des: '',
    component: lazy(() => import('./Strategy/Version')),
    exact: true,
    auth: true,
  },
  {
    path: '/strategy/product',
    name: '产品管理',
    des: '',
    component: lazy(() => import('./Product')),
    exact: true,
    auth: true,
  },
];
